#C:\Users\65506456.NAPP\Desktop

with open(r'C:\Users\65506456.NAPP\Desktop\gaode51.txt','r') as f:
    print(f.readlines())
with open(r'C:\Users\65506456.NAPP\Desktop\gaode51.txt','r') as f:
    print(f.read())
with open(r'C:\Users\65506456.NAPP\Desktop\gaode51.txt','r') as f:
    for i in range(10):print(f.readline())
#'rb',byte file
with open(r'C:\Users\65506456.NAPP\Desktop\xjbh.gif','rb') as f:
    print(f.read())
    
f=open(r'C:\Users\65506456.NAPP\Desktop\gaode51.txt','r',encoding='gbk',errors='ignore')
f.close()

#
with open(r'C:\User\65506456.NAPP\Desktop\hello.txt','w') as f:
    f.write('Hello,world!')
